import request from '@/utils/request'

//获取附件数据
export function queryAttach(data) {
	return request({
		method: 'get',
		url: 'tbSysAttachment/query',
		params: data
	})
}

//获取附件路径
export function queryAttachPath(id) {
	return request({
		method: 'get',
		url: 'tbSysAttachment/queryPathById/' + id
	})
}

//删除附件
export function deleteAttach(id) {
	return request({
		method: 'post',
		url: 'tbSysAttachment/delete/' + id,
	})
}

//下载附件
export function downloadAttach(id) {
	return request({
		method: 'get',
		url: 'tbSysAttachment/download/' + id
	})
}

//上传附件
export function uploadAttach(data) {
	return request({
		method: 'post',
		url: 'tbSysAttachment/upload',
		data
	})
}